package Message.BroadCast
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import Message.Public.*;
    import flash.utils.*;

    public class SEntityInfo extends Object implements IMessageBase
    {
        public var entityId:SEntityId;
        public var name:String;
        public var code:int;
        public var life:int;
        public var maxLife:int;
        public var mana:int;
        public var maxMana:int;
        public var camp:int;
        public var sex:int;
        public var career:int;
        public var guildId:int;
        public var guildName:String;
        public var guildLevel:int;
        public var guildPosition:int;
        public var VIP:int;
        public var gene:int;
        public var talent:int;
        public var fightModel:int;
        public var level:int;
        public var status:int;
        public var toEntitys:Array;
        public var speed:int;
        public var groupStatus:int;
        public var fighting:int;
        public var talk:String;
        public var direction:int;
        public var groupId:Array;
        public var toEntitys2:Array;
        public var reserveJs:String;
        public var weapons:Dictionary;
        public var points:Array;
        public var titles:Dictionary;
        public var buffers:Array;
        public var action:int;
        public const _type:int = 23;
        public static var _regist:SEntityInfo = new SEntityInfo(true);

        public function SEntityInfo(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SEntityInfo();
        }

        public function __write(param1:SerializeStream) : void
        {
            this.entityId.__write(param1);
            param1.writeString(this.name);
            param1.writeInt(this.code);
            param1.writeInt(this.life);
            param1.writeInt(this.maxLife);
            param1.writeInt(this.mana);
            param1.writeInt(this.maxMana);
            param1.writeByte(this.camp);
            param1.writeByte(this.sex);
            param1.writeShort(this.career);
            param1.writeInt(this.guildId);
            param1.writeString(this.guildName);
            param1.writeByte(this.guildLevel);
            param1.writeByte(this.guildPosition);
            param1.writeByte(this.VIP);
            param1.writeByte(this.gene);
            param1.writeShort(this.talent);
            param1.writeByte(this.fightModel);
            param1.writeByte(this.level);
            param1.writeByte(this.status);
            SeqEntityIdHelper.write(param1, this.toEntitys);
            param1.writeShort(this.speed);
            param1.writeByte(this.groupStatus);
            param1.writeByte(this.fighting);
            param1.writeString(this.talk);
            param1.writeByte(this.direction);
            SeqMiniGroupInfoHelper.write(param1, this.groupId);
            SeqEntityIdHelper.write(param1, this.toEntitys2);
            param1.writeString(this.reserveJs);
            DictIntIntHelper.write(param1, this.weapons);
            SeqPointHelper.write(param1, this.points);
            DictIntStrHelper.write(param1, this.titles);
            SeqIntHelper.write(param1, this.buffers);
            param1.writeByte(this.action);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.entityId = new SEntityId();
            this.entityId.__read(param1);
            this.name = param1.readString();
            this.code = param1.readInt();
            this.life = param1.readInt();
            this.maxLife = param1.readInt();
            this.mana = param1.readInt();
            this.maxMana = param1.readInt();
            this.camp = param1.readByte();
            this.sex = param1.readByte();
            this.career = param1.readShort();
            this.guildId = param1.readInt();
            this.guildName = param1.readString();
            this.guildLevel = param1.readByte();
            this.guildPosition = param1.readByte();
            this.VIP = param1.readByte();
            this.gene = param1.readByte();
            this.talent = param1.readShort();
            this.fightModel = param1.readByte();
            this.level = param1.readByte();
            this.status = param1.readByte();
            this.toEntitys = SeqEntityIdHelper.read(param1);
            this.speed = param1.readShort();
            this.groupStatus = param1.readByte();
            this.fighting = param1.readByte();
            this.talk = param1.readString();
            this.direction = param1.readByte();
            this.groupId = SeqMiniGroupInfoHelper.read(param1);
            this.toEntitys2 = SeqEntityIdHelper.read(param1);
            this.reserveJs = param1.readString();
            this.weapons = DictIntIntHelper.read(param1);
            this.points = SeqPointHelper.read(param1);
            this.titles = DictIntStrHelper.read(param1);
            this.buffers = SeqIntHelper.read(param1);
            this.action = param1.readByte();
            
        }

    }
}
